/**
 * Rate 组件的主题配置
 */

import type { ComponentToken } from 'antd/es/rate/style';

const STAR_TOKENS = {
  starColor: '#faad14',
  starSize: 20,
  starHoverScale: 'scale(1.1)',
  starBg: '#f0f0f0',
} as const;

export const rateThemeConfig: Partial<ComponentToken> = {
  starColor: STAR_TOKENS.starColor,
  starSize: STAR_TOKENS.starSize,
  starHoverScale: STAR_TOKENS.starHoverScale as any,
  starBg: STAR_TOKENS.starBg,
};

export const getRateTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...rateThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as RateComponentToken } from 'antd/es/rate/style';

